<template>
	<view class="box">
		<view class="item-wrap">
			<view class="title">
				{{content}}
			</view>
			<image v-if="showIcon" src="@/static/ic_lose.png" class="ic-close"></image>
		</view>
	</view>
</template>

<script>
	export default {
		name: "mem_item",
		props: {
			showIcon: {
				type: Boolean,
				default: true
			},
			content: {
				type: String,
				default: ''
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss">
	.box {
		box-sizing: border-box;
		padding: 15rpx 10rpx;

		.item-wrap {
			display: flex;
			flex-direction: row;
			box-sizing: border-box;
			align-items: center;

			background-color: #eee;

			.title {
				box-sizing: border-box;
				padding: 0rpx 0rpx;
				font-size: 26rpx;
				flex: 1;
				padding: 10rpx 10rpx;
				text-align: center;

				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}

			.ic-close {
				width: 52rpx;
				height: 52rpx;
				box-sizing: border-box;
				margin-left: 20rpx;
				padding: 2rpx;
			}
		}
	}
</style>